package net.hn.hnms.biz.mine.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import net.hn.hnms.biz.api.mine.model.GasIndicatorVo;
import net.hn.hnms.biz.mine.service.GasService;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.sys.common.satoken.config.AutoSetMineCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 智呈物联 pan'sx
 * 2022/9/28 10:59
 * 1.0 version
 */
@RestController
@RequestMapping("gas/earlyWarning")
@Api(value = "瓦斯预警控制器", tags = {"瓦斯预警"})
@RequiredArgsConstructor
public class GasEarlyWarningController {
    private final GasService gasService;

    @GetMapping("gasIndicator")
    @ApiOperation("瓦斯评分")
    @AutoSetMineCode
    public R<GasIndicatorVo> gasIndicator(String mineCode) {
        return R.ok(gasService.gasIndicator(mineCode));
    }
}
